//
//  UserInfoView.swift
//  ClockIn
//
//  Created by enrique leo on 8/8/21.
//

import SwiftUI

struct UserInfoView: View {
    
    var body: some View {
        
        ZStack{
//            LinearGradient(
//                gradient: Gradient(colors: [Self.gradientStart, Self.gradientEnd]),
//                startPoint: UnitPoint(x: 0.5, y: 0),
//                endPoint: UnitPoint(x: 0.5, y: 0.6))
//                .edgesIgnoringSafeArea(.all)
//            Color.purple
//
            
            GradientBackground().edgesIgnoringSafeArea(/*@START_MENU_TOKEN@*/.all/*@END_MENU_TOKEN@*/)
            
            
            VStack{
                
                Spacer()
                
                CircleImage(image: Image("chilkoottrail"), width: UIScreen.main.bounds.width * 0.35, height: UIScreen.main.bounds.width * 0.35)
                    .padding()
                
                Spacer()
                
                VStack(alignment: .leading){
                    HStack{
                        Text("用户名")
                        
                        Spacer()
                    }
                    .padding()
                    
                    Spacer()
                    
                    Text("邮箱")
                        .padding()
                    
                    Spacer()
                    
                    Text("电话")
                        .padding()
                }
                .border(Color.gray, width: 1)
                .frame(width: UIScreen.main.bounds.width * 0.55, height: UIScreen.main.bounds.height * 0.20, alignment: .center)
                .padding()
                
                Spacer()
                
                VStack{
                    Text("关于").frame(width: UIScreen.main.bounds.width * 0.75, alignment: .leading)
                        .offset(y: 8)
                    //                    .frame(width: UIScreen.main.bounds.width * 0.75, height: UIScreen.main.bounds.height * 0.05, alignment: .leading)
                    //                    .padding()
                    //                    .offset(y: 30)
                    
                    VStack(alignment: .leading){
                        HStack{
                            Text("版本")
                            
                            Spacer()
                        }
                        .padding()
                        
                        //                 Spacer()
                        
                        Text("隐私和cookie")
                            .padding()
                        
                        //                Spacer()
                        
                        Text("清楚缓存")
                            .padding()
                        
                        //                Spacer()
                        
                        Text("同步")
                            .padding()
                    }
                    .border(Color.gray, width: 1)
                    .frame(width: UIScreen.main.bounds.width * 0.75, alignment: .center)
    //                .padding()
                    
                    Spacer()
                }
            }
        }

    }
}

struct UserInfoView_Previews: PreviewProvider {
    static var previews: some View {
        UserInfoView()
    }
}
